home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / gnome-1.0 / gtk-xmhtml / XmHTMLP.h < prev   
Encoding:
C/C++ Source or Header  |  2005-10-20  |  38.6 KB  |  1,145 lines

  1. /*****
  2. * XmHTMLP.h : XmHTML Widget private header file
  3. *
  4. * This file Version    $Revision: 1.11.6.1 $
  5. *
  6. * Creation date:        Tue Nov 19 23:18:41 GMT+0100 1996
  7. * Last modification:     $Date: 2001/10/20 06:52:12 $
  8. * By:                    $Author: kmaraas $
  9. * Current State:        $State: Exp $
  10. *
  11. * Author:                newt
  12. * (C)Copyright 1995-1996 Ripley Software Development
  13. * All Rights Reserved
  14. *
  15. * This file is part of the XmHTML Widget Library.
  16. *
  17. * This library is free software; you can redistribute it and/or
  18. * modify it under the terms of the GNU Library General Public
  19. * License as published by the Free Software Foundation; either
  20. * version 2 of the License, or (at your option) any later version.
  21. *
  22. * This library is distributed in the hope that it will be useful,
  23. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  24. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  25. * Library General Public License for more details.
  26. *
  27. * You should have received a copy of the GNU Library General Public
  28. * License along with this library; if not, write to the Free
  29. * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  30. *
  31. *****/
  32. /*****
  33. * $Source: /cvs/gnome/gnome-libs/gtk-xmhtml/Attic/XmHTMLP.h,v $
  34. *****/
  35. /*****
  36. * ChangeLog 
  37. * $Log: XmHTMLP.h,v $
  38. * Revision 1.11.6.1  2001/10/20 06:52:12  kmaraas
  39. * 2001-10-20  Kjartan Maraas  <kmaraas@gnome.org>
  40. *
  41. *     * *.*: Apply all the Red Hat patches.
  42. *
  43. * Revision 1.11  1999/06/02 01:00:37  unammx
  44. *
  45. * 1999-06-01  Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
  46. *
  47. *     * libgnomeui/gnome-canvas-text.c:
  48. *     * libgnomeui/gnome-icon-item.c:
  49. *     * libgnomeui/gnome-less.c: Replace some gdk_font_load() calls with
  50. *     gdk_fontset_load.    Use a more open fontset rule to load the fonts.
  51. *
  52. * 1999-06-01  Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
  53. *
  54. *     * gtk-xmhtml/XmHTMLP.h: Add three members lbearing, rbearing,
  55. *     and width. These members are computed in allocFont().
  56. *
  57. *     * gtk-xmhtml/toolkit.h: Remove Toolkit_XFont() macro.
  58. *
  59. *     * gtk-xmhtml/XmHTML.c:
  60. *     * gtk-xmhtml/fonts.c:
  61. *     * gtk-xmhtml/format.c:
  62. *     * gtk-xmhtml/gtk-xmhtml.c:
  63. *     * gtk-xmhtml/layout.c:
  64. *     * gtk-xmhtml/paint.c: Add fontset support. We use gdk_fontset_load()
  65. *     instead of gdk_font_load() iff a fontset is supplied for label
  66. *     widgets.
  67. *
  68. *     * gtk-xmhtml/test.c: Add gtk_set_locale() call before gtk_init().
  69. *
  70. * Revision 1.10  1998/02/12 03:08:23  unammx
  71. * Merge to Koen's XmHTML 1.1.2 + following fixes:
  72. *
  73. * Wed Feb 11 20:27:19 1998  Miguel de Icaza  <miguel@nuclecu.unam.mx>
  74. *
  75. *     * gtk-forms.c (freeForm): gtk_destroy_widget is no longer needed
  76. *     with the refcounting changes.
  77. *
  78. *     * gtk-xmhtml.c (gtk_xmhtml_remove): Only god knows why I was
  79. *     adding the just removed widget.
  80. *
  81. * Revision 1.9  1998/02/11 00:02:29  unammx
  82. * Tue Feb 10 18:02:19 1998  Miguel de Icaza  <miguel@nuclecu.unam.mx>
  83. *
  84. *     * XmHTMLP.h: Debugging fields on the structure are always
  85. *     included, no matter if DEBUG was defined or not.  Otherwise
  86. *     applications linked with XmHTML would required to use the same
  87. *     defines that were used originally.
  88. *
  89. * Revision 1.8  1998/01/07 01:45:36  unammx
  90. * Gtk/XmHTML is ready to be used by the Gnome hackers now!
  91. * Weeeeeee!
  92. *
  93. * This afternoon:
  94. *
  95. *     - Changes to integrate gtk-xmhtml into an autoconf setup.
  96. *
  97. *     - Changes to make gtk-xmhtml a library to be used by Gnome
  98. *       (simply include <gtk-xmhtml/gtk-xmhtml.h and link
  99. *        with -lgtkxmhtml and you are set).
  100. *
  101. * Revision 1.7  1997/12/30 03:32:51  unammx
  102. * More work on getting the frames working, still some bits are missing - Miguel
  103. *
  104. * Revision 1.6  1997/12/29 22:16:22  unammx
  105. * This version does:
  106. *
  107. *    - Sync with Koen to version Beta 1.1.2c of the XmHTML widget.
  108. *      Includes various table fixes.
  109. *
  110. *    - Callbacks are now properly checked for the Gtk edition (ie,
  111. *      signals).
  112. *
  113. * Revision 1.5  1997/12/25 01:34:10  unammx
  114. * Good news for the day:
  115. *
  116. *    I have upgraded our XmHTML sources to XmHTML 1.1.1.
  117. *
  118. *    This basically means that we got table support :-)
  119. *
  120. * Still left to do:
  121. *
  122. *    - Set/Get gtk interface for all of the toys in the widget.
  123. *    - Frame support is broken, dunno why.
  124. *    - Form support (ie adding widgets to it)
  125. *
  126. * Miguel.
  127. *
  128. * Revision 1.4  1997/12/24 17:53:54  unammx
  129. * Fun stuff:
  130. *
  131. *     The widget now handles mouse motion, mouse clicks, anchors can
  132. *     be clicked.
  133. *
  134. *     The widget emits signals for all of the interesting events
  135. *     (the same events that were used by the Motif port, we just use
  136. *     signals instead of XtCallbacks).
  137. *
  138. * Boring stuff:
  139. *
  140. *     The widget now handles focusin/focusout/enternotif/leavenotify
  141. *
  142. *     More code sharing between the Motif frontend an the Gtk
  143. *     frontned;   More portability macros;
  144. *
  145. *     Cleaned up some more the privte widget header files.
  146. *
  147. * Revision 1.3  1997/12/18 00:39:21  unammx
  148. * It compiles and links -miguel
  149. *
  150. * Revision 1.2  1997/12/17 04:40:28  unammx
  151. * Your daily XmHTML code is here.  It almost links.  Only the
  152. * images.c file is left to port.  Once this is ported we are all
  153. * set to start debugging this baby.
  154. *
  155. * btw, Dickscrape is a Motif based web browser that is entirely
  156. * based on this widget, I just tested it today, very impressive.
  157. *
  158. * Miguel.
  159. *
  160. * Revision 1.1  1997/11/28 03:38:56  gnomecvs
  161. * Work in progress port of XmHTML;  No, it does not compile, don't even try -mig
  162. *
  163. * Revision 1.18  1997/10/26 23:50:04  newt
  164. * Added internal symbol defines (_LIBRARY stuff)
  165. *
  166. * Revision 1.17  1997/10/23 00:24:47  newt
  167. * XmHTML Beta 1.1.0 release
  168. *
  169. * Revision 1.16  1997/08/31 17:32:58  newt
  170. * log edit
  171. *
  172. * Revision 1.15  1997/08/30 00:42:16  newt
  173. * Reorganized a number of things and moved all private XmHTML functions to
  174. * the XmHTMLI.h include file.
  175. *
  176. * Revision 1.14  1997/08/01 12:55:01  newt
  177. * Progressive image loading changes.
  178. *
  179. * Revision 1.13  1997/05/28 01:43:05  newt
  180. * Made all image options a long instead of a Byte. Additional protos for the
  181. * XmNdecodeGIFProc resource.
  182. *
  183. * Revision 1.12  1997/04/29 14:23:03  newt
  184. * Moved all XmHTML private functions in.
  185. *
  186. * Revision 1.11  1997/04/03 05:31:52  newt
  187. * Added an additional base field to the XmHTMLWord structure.
  188. *
  189. * Revision 1.10  1997/03/28 07:06:26  newt
  190. * Frame interface support.
  191. *
  192. * Revision 1.9  1997/03/20 08:06:11  newt
  193. * XmNrepeatDelay, moved HTML enumeration table from XmHTML.h in here
  194. *
  195. * Revision 1.8  1997/03/11 19:50:50  newt
  196. * Changes in XmHTMLImage, XmHTMLWord and XmHTMLObjectTable
  197. *
  198. * Revision 1.7  1997/03/04 18:46:42  newt
  199. * XmHTMLImage changed for animation support; imagemap_fg and imagemap_draw added
  200. *
  201. * Revision 1.6  1997/03/04 00:56:58  newt
  202. * Removed some obsolete fields
  203. *
  204. * Revision 1.5  1997/03/02 23:09:30  newt
  205. * XmHTMLImage, XmHTMLImageMap, XmHTMLAnchor structs modified.
  206. *
  207. * Revision 1.4  1997/02/11 02:02:11  newt
  208. * Removed obsolete fields from XmHTMLWord, XmHTMLObjectTable. 
  209. * Added stuff for new anchor treatment.
  210. *
  211. * Revision 1.3  1997/01/09 06:55:56  newt
  212. * expanded copyright marker
  213. *
  214. * Revision 1.2  1997/01/09 06:48:29  newt
  215. * changes in XmHTMLWord. Added all image structures and enums.
  216. *
  217. * Revision 1.1  1996/12/19 02:17:16  newt
  218. * Initial Revision
  219. *
  220. *****/ 
  221.  
  222. #ifndef _XmHTMLP_h_
  223. #define _XmHTMLP_h_
  224.  
  225. #include <X11/Xatom.h>        /* property defines */
  226. /* Required includes */
  227.  
  228. #ifdef WITH_MOTIF
  229. #     include <XmHTML/toolkit.h>
  230. #     include <XmHTML/XmHTML.h>
  231. #else
  232. #     include <gtk-xmhtml/toolkit.h>
  233. #     include <gtk-xmhtml/XmHTML.h>
  234. #endif
  235.  
  236.  
  237.  
  238. /*****
  239. * NEVER define VERSION *or* _LIBRARY yourself. These are defines required
  240. * for compiling the library. When defined, they pull in a number of other
  241. * header files which are normally *not* installed.
  242. *****/
  243. #ifdef GNOME_LIB
  244. #   ifndef VERSION
  245. #       define VERSION
  246. #   endif
  247. #endif
  248.  
  249. #ifdef VERSION
  250. # ifndef _LIBRARY
  251. #  define _LIBRARY
  252. # endif
  253. #endif/* VERSION */
  254.  
  255. /*****
  256. * prevent multiple decls when building the lib.
  257. * zconf.h (which gets included by png.h) also typedefs Byte to unsigned char.
  258. * The compiler warning is annoying, so just don't typedef it again.
  259. * XCC is an opaque object defined in XCCP.h
  260. *****/
  261. #ifdef _LIBRARY
  262. # ifdef WITH_MOTIF
  263. #  include "XCC.h"        /* XColorContext definitions and protos */
  264. # else
  265. typedef GdkColorContext *XCC;
  266. # endif
  267. # ifdef _ZCONF_H
  268. #  ifndef BYTE_ALREADY_TYPEDEFED
  269. #   define BYTE_ALREADY_TYPEDEFED
  270. #  endif /* BYTE_ALREADY_TYPEDEFED */
  271. # endif /* _ZCONF_H */
  272. #else
  273.   typedef struct _XColorContext *XCC;
  274. #endif /* _LIBRARY */
  275.  
  276. #ifndef BYTE_ALREADY_TYPEDEFED
  277. #define BYTE_ALREADY_TYPEDEFED
  278. typedef unsigned char Byte;
  279. #endif /* BYTE_ALREADY_TYPEDEFED */
  280.  
  281. _XFUNCPROTOBEGIN
  282.  
  283. /*****
  284. * A whole slew of states for all kinds of internal objects.
  285. *****/
  286.  
  287. /*****
  288. * Line styles
  289. *****/
  290. #define LINE_SOLID        (1<<1)    /* paint a solid line    */
  291. #define LINE_DASHED        (1<<2)    /* paint a dashed line    */
  292. #define LINE_SINGLE        (1<<3)    /* paint a single line    */
  293. #define LINE_DOUBLE        (1<<4)    /* paint a double line    */
  294. #define LINE_STRIKE        (1<<5)    /* render as strikeout    */
  295. #define LINE_UNDER        (1<<6)    /* render as underline    */
  296. #define NO_LINE            0        /* no lines at all        */
  297.  
  298. /*****
  299. * Spacing and anchor text data bits
  300. *****/
  301. #define TEXT_SPACE_NONE            (1<<0)    /* no spacing at all            */
  302. #define TEXT_SPACE_LEAD            (1<<1)    /* add a leading space            */
  303. #define TEXT_SPACE_TRAIL         (1<<2)    /* add a trailing space            */
  304. #define TEXT_ANCHOR                (1<<3)    /* a regular anchor                */
  305. #define TEXT_ANCHOR_INTERN        (1<<4)    /* internal anchor flag            */
  306. #define TEXT_IMAGE                (1<<5)    /* indicates an image member    */
  307. #define TEXT_FORM                (1<<6)    /* indicates a form member        */
  308. #define TEXT_BREAK                (1<<7)    /* indicates a linebreak        */
  309. #define TEXT_SPACE_LEAD_ZEROWIDTH    (1<<8)    /* no spacing, but can break before the word    */
  310. #define TEXT_SPACE_TRAIL_ZEROWIDTH    (1<<9)    /* no spacing, but can break after the word    */
  311.  
  312. /***** 
  313. * HTML list marker enumeration type 
  314. *****/
  315. typedef enum{
  316.     XmMARKER_NONE = 0, 
  317.     XmMARKER_ARABIC = 10, 
  318.     XmMARKER_ALPHA_LOWER, 
  319.     XmMARKER_ALPHA_UPPER, 
  320.     XmMARKER_ROMAN_LOWER,
  321.     XmMARKER_ROMAN_UPPER,
  322.     XmMARKER_DISC = 15,
  323.     XmMARKER_SQUARE,
  324.     XmMARKER_CIRCLE
  325. }Marker;
  326.  
  327. /***** 
  328. * Horizontal/Vertical alignment data 
  329. *****/
  330. typedef enum{
  331.     XmHALIGN_NONE = 0,    /* horizontal alignment */
  332.     XmHALIGN_LEFT,
  333.     XmHALIGN_CENTER,
  334.     XmHALIGN_RIGHT,
  335.     XmHALIGN_JUSTIFY,    /* extension for fully justified text */
  336.     XmVALIGN_NONE = 8,    /* vertical alignment */
  337.     XmVALIGN_TOP,
  338.     XmVALIGN_MIDDLE,
  339.     XmVALIGN_BOTTOM,
  340.     XmVALIGN_BASELINE
  341. }Alignment;
  342.  
  343. /***** 
  344. * Possible types of HTML objects. 
  345. * All text types are only used when computing the screen layout
  346. *****/
  347. typedef enum{
  348.     OBJ_NONE = 0,
  349.     OBJ_TEXT,            /* text element                            */
  350.     OBJ_PRE_TEXT,        /* preformatted text                    */
  351.     OBJ_BULLET,            /* all types of markers for lists        */
  352.     OBJ_HRULE,            /* horizontal rule                        */
  353.     OBJ_TABLE,            /* table elements                        */
  354.     OBJ_TABLE_FRAME,    /* table caption, row, cell elements    */
  355.     OBJ_IMG,            /* image elements                        */
  356.     OBJ_FORM,            /* form elements                        */
  357.     OBJ_APPLET,            /* applet elements                        */
  358.     OBJ_BLOCK            /* other block level elements            */
  359. }ObjectType;
  360.  
  361. /*****
  362. * linefeed types
  363. *****/
  364. #define CLEAR_NONE            -1        /* stay on the same line                */
  365. #define CLEAR_SOFT            0        /* return + move single line downard    */
  366. #define CLEAR_HARD            1        /* return + move two lines downward        */
  367. #define CLEAR_ALL            2        /* return + move baseline fully down    */
  368.  
  369. /*****
  370. * Server/client side and map type values 
  371. *****/
  372. typedef enum{
  373.     XmMAP_NONE = 1,
  374.     XmMAP_SERVER,
  375.     XmMAP_CLIENT
  376. }Imagemap;
  377.  
  378. /*****
  379. * Image option bits.
  380. * Each of these bits represents certain state information about an image.
  381. *****/
  382. #define IMG_ISBACKGROUND        (1L<<1)    /* is a background image            */
  383. #define IMG_ISINTERNAL            (1L<<2)    /* is an internal image                */
  384. #define IMG_ISCOPY                (1L<<3)    /* is a referential copy            */
  385. #define IMG_ISANIM                (1L<<4)    /* is an animation                    */
  386. #define IMG_FRAMEREFRESH        (1L<<5)    /* set when running an animation    */
  387. #define IMG_HASDIMENSIONS        (1L<<6)    /* dimensions are given in <IMG>    */
  388. #define IMG_HASSTATE            (1L<<7)    /* current state pixmap present        */
  389. #define IMG_INFOFREED            (1L<<8)    /* imageinfo has been freed            */
  390. #define IMG_DELAYED_CREATION    (1L<<9)    /* create when needed                */
  391. #define IMG_ORPHANED            (1L<<10)/* indicates orphaned image            */
  392. #define IMG_PROGRESSIVE            (1L<<11)/* indicates image is being loaded    */
  393.  
  394. /*****
  395. * Possible colorclass an image can have.
  396. *****/
  397. #define COLOR_CLASS_GRAYSCALE    0
  398. #define COLOR_CLASS_INDEXED        1
  399. #define COLOR_CLASS_RGB            2
  400.  
  401. /*****
  402. * What type of scrolling a frame should employ.
  403. *****/
  404. typedef enum{
  405.     FRAME_SCROLL_NONE = 1,
  406.     FRAME_SCROLL_AUTO,
  407.     FRAME_SCROLL_YES
  408. }FrameScrolling;
  409.  
  410. /*****
  411. * Possible types of frame sizes
  412. *****/
  413. typedef enum{
  414.     FRAME_SIZE_FIXED = 1,            /* size specified in pixels    */
  415.     FRAME_SIZE_RELATIVE,            /* size is relative            */
  416.     FRAME_SIZE_OPTIONAL                /* size is optional            */
  417. }FrameSize;
  418.  
  419. /*****
  420. * The three possible anchor selection states
  421. *****/
  422. #define ANCHOR_UNSELECTED    (Byte)0        /* default anchor state            */
  423. #define ANCHOR_INSELECT        (Byte)1        /* anchor is gaining selection    */
  424. #define ANCHOR_SELECTED        (Byte)2        /* anchor is selected            */
  425.  
  426. /*****
  427. * XmHTML font style bits
  428. *****/
  429. #define FONT_BOLD        (1<<1)
  430. #define FONT_MEDIUM        (1<<2)
  431. #define FONT_ITALIC        (1<<3)
  432. #define FONT_REGULAR    (1<<4)
  433. #define FONT_FIXED        (1<<5)
  434. #define FONT_SCALABLE    (1<<6)
  435.  
  436. /*****
  437. * A XmHTML font. XmHTML uses it's own font definition for performance
  438. * reasons (the layout routines use a *lot* of font properties).
  439. *****/
  440. typedef struct{
  441.      Byte style;                    /* this font's style                        */
  442.      String font_name;            /* full XLFD                                */
  443.      String font_family;            /* fontFamily (foundry-family-sw-spacing)    */
  444.      TFontStruct *xfont;            /* ptr to font definition                    */
  445.      int lbearing;                    /* lbearing of largest character            */
  446.      int rbearing;                    /* rbearing of largest character            */
  447.      int width;                    /* width of largest character                */
  448.      int height;                    /* height of largest character                */
  449.      int lineheight;                /* suggested lineheight                        */
  450.      Cardinal isp;                /* normal interword spacing                    */
  451.      Cardinal eol_sp;            /* additional end-of-line spacing            */
  452.      int sup_xoffset;            /* additional superscript x-offset            */
  453.      int sup_yoffset;            /* additional superscript y-offset            */
  454.      int sub_xoffset;            /* additional subscript x-offset            */
  455.      int sub_yoffset;            /* additional subscript y-offset            */
  456.      int ul_offset;                /* additional underline offset                */
  457.      Cardinal ul_thickness;        /* underline thickness                        */
  458.      int st_offset;                /* additional strikeout offset                */
  459.      Cardinal st_thickness;        /* strikeout thickness                        */
  460. }XmHTMLfont;
  461.  
  462. /**********
  463. ****** Definition of all possible Objects
  464. **********/
  465.  
  466. /*****
  467. * HTML4.0 Events
  468. *****/
  469. typedef struct _HTEvent{
  470.     int            type;            /* HTML4.0 event type    */
  471.     XtPointer    data;            /* event user data        */
  472. }HTEvent;
  473.  
  474. /*****
  475. * All possible events that HTML4.0 defines
  476. * All fields are ptrs into XmHTML HTEvent array.
  477. *****/
  478. typedef struct _AllEvents{
  479.     /* Document/Frame specific events */
  480.     HTEvent        *onLoad;
  481.     HTEvent        *onUnload;
  482.  
  483.     /* HTML Form specific events */
  484.     HTEvent        *onSubmit;
  485.     HTEvent        *onReset;
  486.     HTEvent        *onFocus;
  487.     HTEvent        *onBlur;
  488.     HTEvent        *onSelect;
  489.     HTEvent        *onChange;
  490.  
  491.     /* object events */
  492.     HTEvent        *onClick;
  493.     HTEvent        *onDblClick;
  494.     HTEvent        *onMouseDown;
  495.     HTEvent        *onMouseUp;
  496.     HTEvent        *onMouseOver;
  497.     HTEvent        *onMouseMove;
  498.     HTEvent        *onMouseOut;
  499.     HTEvent        *onKeyPress;
  500.     HTEvent        *onKeyDown;
  501.     HTEvent        *onKeyUp;
  502. }AllEvents;
  503.  
  504. /*****
  505. * Definition of an anchor 
  506. * URLType is an enumeration type defined in HTML.h
  507. *****/
  508. typedef struct _XmHTMLAnchor{
  509.     URLType                url_type;        /* url type of anchor            */
  510.     String                name;            /* name if it's a named anchor    */
  511.     String                href;            /* referenced URL                */
  512.     String                target;            /* target spec                    */
  513.     String                rel;            /* possible rel                    */
  514.     String                rev;            /* possible rev                    */
  515.     String                title;            /* possible title                */
  516.     AllEvents            *events;        /* events to be served            */
  517.     Cardinal             line;            /* location of this anchor        */
  518.     Boolean                visited;        /* true when anchor is visited    */
  519.     struct _XmHTMLAnchor *next;            /* ptr to next anchor            */
  520. }XmHTMLAnchor;
  521.  
  522. /*****
  523. * Definition of a word (a word can be plain text, an image, a form member
  524. * or a linebreak).
  525. *****/
  526. typedef struct _XmHTMLWord{
  527.     int                 x;            /* x-position for this word                */
  528.     int                    y;            /* y-position for this word                */
  529.     Dimension             width;        /* pixel width of word                    */
  530.     Dimension             height;        /* pixel height of word                    */
  531.     Cardinal             line;        /* line for this word                    */
  532.     ObjectType             type;        /* type of word, used by <pre>,<img>    */
  533.     String                 word;        /* word to display                        */
  534.     int                 len;        /* string length of word                */
  535.     XmHTMLfont             *font;        /* font to use                            */
  536.     Byte                 line_data;    /* line data (underline/strikeout)        */
  537.     int                spacing;    /* leading/trailing/nospace allowed        */
  538.     AllEvents            *events;    /* events to be served                    */
  539.     struct _XmHTMLImage *image;        /* when this is an image                */
  540.     struct _XmHTMLForm    *form;        /* when this is a form element            */
  541.     struct _XmHTMLWord    *base;        /* baseline word for a line                */
  542.     struct _XmHTMLWord    *self;         /* ptr to itself, for anchor adjustment    */
  543.     struct _XmHTMLObjectTable *owner;    /* owner of this worddata            */
  544. }XmHTMLWord;
  545.  
  546. /* area definition. See map.c for the full definition */
  547. typedef struct _mapArea mapArea;
  548.  
  549. /*****
  550. * Client-side imagemap information
  551. * mapArea is a transparent object and is defined in map.c
  552. *****/
  553. typedef struct _XmHTMLImageMap{
  554.     String                name;        /* name of map            */
  555.     int                    nareas;        /* no of areas            */
  556.     mapArea                *areas;        /* list of areas        */
  557.     struct _XmHTMLImageMap *next;    /* ptr to next imagemap */
  558. }XmHTMLImageMap;
  559.  
  560. /*****
  561. * XmHTML's internal image format.
  562. * One very important thing to note is that the meaning of the (width,height)
  563. * and (swidth,sheight) members of this structure is exactly *OPPOSITE* to
  564. * the members with the same name in the public structures (XmImageInfo and
  565. * XmImage).
  566. *****/
  567. typedef struct _XmHTMLImage{
  568.     /* Normal image data */
  569.     Byte            magic;            /* structure identifier */
  570.     String            url;            /* raw src specification */
  571.     XmImageInfo        *html_image;    /* local image data */
  572.     TPixmap            pixmap;            /* actual image */
  573.     TPixmap            clip;            /* for transparant pixmaps */
  574.     unsigned long    options;        /* image option bits */
  575.     int                width;            /* resulting image width */
  576.     int                height;            /* resulting image height */
  577.     int                npixels;        /* no of allocated pixels */
  578.     XCC             xcc;            /* a lot of visual info */
  579.  
  580.     /* Possible <IMG> attributes */
  581.     int                swidth;            /* requested image width */
  582.     int                sheight;        /* requested image height */
  583.     String            alt;            /* alternative image text */
  584.     Alignment        align;            /* image alignment */
  585.     Imagemap        map_type;        /* type of map to use */
  586.     String            map_url;        /* image map url/name */
  587.     Dimension        border;            /* image border thickness */
  588.     Dimension        hspace;            /* horizontal spacing */
  589.     Dimension        vspace;            /* vertical spacing */
  590.  
  591.     struct _XmHTMLObjectTable *owner;    /* owner of this image */
  592.     struct _XmHTMLImage *child;        /* ptr to copies of this image */
  593.     struct _XmHTMLImage *next;        /* ptr to next image */
  594.  
  595.     /* animation data */
  596.     XmImageFrame     *frames;        /* array of animation frames */
  597.     int                nframes;        /* no of frames following */
  598.     int                current_frame;    /* current frame count */
  599.     int                current_loop;    /* current loop count */
  600.     int                loop_count;        /* maximum loop count */
  601.     TIntervalId    proc_id;        /* timer id for animations */
  602.     XmHTMLWidget    html;            /* image owner */
  603.     TAppContext    context;        /* Application context for animations */
  604.  
  605.      /* other data */
  606.     AllEvents            *events;    /* events to be served */
  607. }XmHTMLImage;
  608.  
  609. /*****
  610. * The following structure is used to mimic file access in memory.
  611. *****/
  612. typedef struct{
  613.     char *file;                    /* name of file */
  614.     Byte *buffer;                /* memory buffer */
  615.     Byte *curr_pos;                /* current position in buffer */
  616.     size_t next;                /* current block count */
  617.     size_t size;                /* total size of in-memory file */
  618.     Boolean may_free;            /* True when we must free this block */
  619.     unsigned char type;            /* type of image */
  620.     int depth;                    /* depth of this image */
  621. }ImageBuffer;
  622.  
  623. /*****
  624. * Definition of HTML form components
  625. *****/
  626. typedef struct _XmHTMLForm{
  627.     int                 x;                /* x-position for this widget */
  628.     int             y;                /* y-position for this widget */
  629.     Dimension         width;            /* width of this widget */
  630.     Dimension         height;            /* height of this widget */
  631.     Cardinal        line;            /* starting line number of this object */
  632.     TWidget             w;                /* TWidget ID */
  633.     TWidget            child;            /* child id for scrolled stuff */
  634.     String             name;            /* name for this TWidget */
  635.     Byte             type;            /* TWidget type (see HTML.h) */
  636.     int                size;            /* cols in text(field)/items in select */
  637.     int                maxlength;        /* max chars to enter/rows in textarea */
  638.     String             value;            /* default text */
  639.     String            content;        /* entered text(field) contents */
  640.     Alignment        align;            /* image/file browse button position */
  641.     Boolean            multiple;        /* multiple select flag */
  642.     int                selected;        /* default state */
  643.     Boolean         checked;        /* check value for option/radio buttons. */
  644.     Boolean         mapped;            /* True when displayed, false otherwise */
  645.     struct _XmHTMLForm *options;    /* option items for select */
  646.     struct _XmHTMLObjectTable *data;/* owning data object */
  647.     struct _XmHTMLFormData *parent;    /* parent form */
  648.     struct _XmHTMLForm *prev;        /* ptr to previous record */
  649.     struct _XmHTMLForm *next;        /* ptr to next record */
  650. }XmHTMLForm;
  651.  
  652. /*****
  653. * Definition of form data
  654. *****/
  655. typedef struct _XmHTMLFormData{
  656.     Widget html;                    /* owner of this form */
  657.     String action;                    /* destination url/cgi-bin */
  658.     int method;                        /* XmHTML_FORM_GET,POST,PIPE */
  659.     String enctype;                    /* form encoding */
  660.     int ncomponents;                /* no of items in this form */
  661.     Widget fileSB;                    /* input == file */
  662.     XmHTMLForm *components;            /* list of form items */
  663.     struct _XmHTMLFormData *prev;    /* ptr to previous form */
  664.     struct _XmHTMLFormData *next;    /* ptr to next form */
  665. }XmHTMLFormData;
  666.  
  667. /*****
  668. * Definition of XmHTML tables
  669. *
  670. * Dimensions:
  671. * positive -> absolute number;
  672. * negative -> relative number;
  673. * 0        -> no dimension specified;
  674. *
  675. * Each component in a table has a set of core properties. Properties are
  676. * inherited from top to bottom and can be overriden.
  677. *
  678. * Content containers render the contents of all objects between
  679. * start (inclusive) and end (exclusive).
  680. *****/
  681. /* possible framing types */
  682. typedef enum{
  683.     TFRAME_VOID = 0,            /* no borders        */
  684.     TFRAME_ABOVE,                /* only top side    */
  685.     TFRAME_BELOW,                /* only bottom side    */
  686.     TFRAME_LEFT,                /* only left side    */
  687.     TFRAME_RIGHT,                /* only right side    */
  688.     TFRAME_HSIDES,                /* top & bottom        */
  689.     TFRAME_VSIDES,                /* left & right        */
  690.     TFRAME_BOX,                    /* all sides        */
  691.     TFRAME_BORDER                /* all sides        */
  692. }TableFraming;
  693.  
  694. /* possible ruling types */
  695. typedef enum{
  696.     TRULE_NONE = 0,                /* no rules            */
  697.     TRULE_GROUPS,                /* only colgroups    */
  698.     TRULE_ROWS,                    /* only rows        */
  699.     TRULE_COLS,                    /* only columns        */
  700.     TRULE_ALL                    /* all cells        */
  701. }TableRuling;
  702.  
  703. /*****
  704. * Properties shared by all table elements. These are inherited from top to
  705. * bottom and can be overriden by the appropriate tag attributes.
  706. *****/
  707. typedef struct _TableProperties{
  708.     int                border;                /* border width, 0 = noborder    */
  709.     Alignment        halign;                /* content horizontal alignment    */
  710.     Alignment        valign;                /* content vertical alignment    */
  711.     Pixel            bg;                    /* content background color        */
  712.     XmHTMLImage        *bg_image;            /* content background image        */
  713.     TableFraming    framing;            /* what frame should we use?    */
  714.     TableRuling        ruling;                /* what rules should we draw?    */
  715.     Boolean                 nowrap;                         /* don't break lines            */
  716. }TableProperties;
  717.  
  718. /*****
  719. * a Cell, can be a header cell or a simple cell.
  720. *****/
  721. typedef struct _TableCell{
  722.     Boolean            header;                /* True if a header cell    */
  723.     int                width;                /* suggested cell width        */
  724.     int                height;                /* suggested cell height    */
  725.     int                rowspan;            /* no of rows spanned        */
  726.     int                colspan;            /* no of cells spanned        */
  727.     TableProperties    *properties;        /* properties for this cell    */
  728.     struct _XmHTMLObjectTable *start;    /* first object to render    */
  729.     struct _XmHTMLObjectTable *end;        /* last object to render    */
  730.     struct _XmHTMLObjectTable *owner;    /* owning object            */
  731.     struct _TableRow *parent;            /* parent of this cell        */
  732. }TableCell;
  733.  
  734. /* A row. A row consists of a number of Cells */
  735. typedef struct _TableRow{
  736.     TableCell        *cells;                /* all cells in this row    */
  737.     int                ncells;                /* no of cells in row        */
  738.     int                lastcell;            /* last used cell            */
  739.     TableProperties    *properties;        /* properties for this row    */
  740.     struct _XmHTMLObjectTable *start;    /* first object to render    */
  741.     struct _XmHTMLObjectTable *end;        /* last object to render    */
  742.     struct _XmHTMLObjectTable *owner;    /* owning object            */
  743.     struct _XmHTMLTable *parent;        /* parent of this row        */
  744. }TableRow;
  745.  
  746. /*****
  747. * A table. A table consists of a Caption and a number of Rows
  748. * The caption is a special row: it has only one cell that stretches
  749. * across the entire table: itself.
  750. *****/
  751. typedef struct _XmHTMLTable{
  752.     /* overall table properties */
  753.     int                width;                /* suggested table width    */
  754.     int                hmargin;            /* horizontal cell margin    */
  755.     int                vmargin;            /* vertical cell margin        */
  756.     int                hpadding;            /* horizontal cell padding    */
  757.     int                vpadding;            /* vertical row padding        */
  758.     int                ncols;                /* no of columns            */
  759.     TableProperties *properties;        /* master table properties    */
  760.  
  761.     TableRow        *caption;            /* table caption            */
  762.     TableRow        *rows;                /* all table rows            */
  763.     int                nrows;                /* no of rows in table        */
  764.     int                lastrow;            /* last used row            */
  765.  
  766.     struct _XmHTMLTable *parent;        /* parent table (for childs)*/
  767.     struct _XmHTMLTable *childs;        /* table child                */
  768.     int                nchilds;            /* no of child tables        */
  769.     int                lastchild;            /* last used table            */
  770.  
  771.     struct _XmHTMLObjectTable *start;    /* first object in table    */
  772.     struct _XmHTMLObjectTable *end;        /* last object in table        */
  773.  
  774.     struct _XmHTMLObjectTable *owner;    /* owner of this table        */
  775.  
  776.     struct _XmHTMLTable *next;            /* ptr to next table        */
  777. }XmHTMLTable;
  778.  
  779. /*****
  780. * Definition of formatted HTML elements
  781. *****/
  782. typedef struct _XmHTMLObjectTable{
  783.     int                x;                /* x position for this element        */
  784.     int                y;                /* y position for this element        */
  785.     Dimension        width;            /* width of this element            */
  786.     Dimension        height;            /* height of this element            */
  787.     Cardinal        line;            /* starting line number of this object */
  788.     Cardinal        id;                /* object identifier (anchors only)    */
  789.     ObjectType        object_type;    /* element type                        */
  790.     String            text;            /* cleaned text                        */
  791.     Byte            text_data;        /* text/image/anchor data bits        */
  792.     int                len;            /* length of text or width of a rule*/
  793.     int                y_offset;        /* offset for sub/sup, <hr> noshade flag */
  794.     int                x_offset;        /* additional offset for sub/sup    */
  795.     XmHTMLObject    *object;        /* object data (raw text)            */
  796.     XmHTMLAnchor    *anchor;        /* ptr to anchor data                */
  797.     XmHTMLWord        *words;            /* words to be displayed            */
  798.     XmHTMLForm        *form;            /* form data                        */
  799.     XmHTMLTable        *table;            /* table data                        */
  800.     int                n_words;        /* number of words                    */
  801.     Byte            anchor_state;    /* anchor selection state identifier*/
  802.     Alignment        halign;            /* horizontal line alignment        */
  803.     int                linefeed;        /* linebreak type                    */
  804.     Dimension        ident;            /* xoffset for list indentation        */
  805.     Marker            marker;            /* marker to use in lists            */        
  806.     int                list_level;        /* current count of list element.    */
  807.     XmHTMLfont        *font;            /* font to be used for this object    */
  808.     Pixel            fg;                /* foreground color for this object    */
  809.     Pixel            bg;                /* background color for this object    */
  810.     struct _XmHTMLObjectTable *next;
  811.     struct _XmHTMLObjectTable *prev;
  812. }XmHTMLObjectTable, *XmHTMLObjectTableElement;
  813.  
  814. /*****
  815. *
  816. *****/
  817. typedef struct _XmHTMLSelection{
  818.     XmHTMLObjectTable *start;        /* selection start object */
  819.     int start_word;                    /* first word index */
  820.     int start_nwords;                /* word count */
  821.  
  822.     XmHTMLObjectTable *end;            /* ending start object (inclusive) */
  823.     int end_word;                    /* first word index */
  824.     int end_nwords;                    /* word count */
  825. }XmHTMLSelection;
  826.  
  827. /*****
  828. * definition of frame childs
  829. *****/
  830. typedef struct _XmHTMLFrameWidget{
  831.     int                x;                /* computed frame x-position */
  832.     int                y;                /* computed frame y-position */
  833.     Dimension        width;            /* computed frame width */
  834.     Dimension        height;            /* computed frame height */
  835.     int                xs;                /* saved x-position */
  836.     int                ys;                /* saved y-position */
  837.     Dimension        width_s;        /* saved frame width */
  838.     Dimension        height_s;        /* saved frame height */
  839.     FrameSize        width_type;        /* horizontal frame size specification */
  840.     FrameSize        height_type;    /* vertical frame size specification */
  841.     FrameScrolling    scroll_type;    /* frame scrolling */
  842.     String            src;            /* source document */
  843.     String            name;            /* internal frame name */
  844.     Dimension        margin_width;    /* frame margin width */
  845.     Dimension        margin_height;    /* frame margin height */
  846.     Boolean            resize;            /* may we resize this frame? */
  847.     int                border;            /* add a border around this frame? */
  848.     TWidget            frame;            /* XmHTMLWidget id for this frame */
  849. }XmHTMLFrameWidget;
  850.  
  851. /*****
  852. * Parser state stack object
  853. *****/
  854. typedef struct _stateStack{
  855.     htmlEnum id;                    /* current state id */
  856.     struct _stateStack *next;        /* ptr to next record */
  857. }stateStack;
  858.  
  859. /*****
  860. * Progressive Loading Context. This is an opaque object fully defined in
  861. * plc.h. It's a rather complex thing for all objects than can be loaded
  862. * progressively. It maintains the state of each object (data as well as data
  863. * processing functions) and does a bunch of nifty things.
  864. *****/ 
  865. typedef struct _PLC *PLCPtr;
  866.  
  867. /*****
  868. * This struct is required to properly perform alpha channel processing.
  869. * It contains information about the current background setting.
  870. *
  871. * Alpha channel processing is done for PNG images with (obviously) an alpha
  872. * channel. The data used for creating the pixmap is a merger of the original
  873. * image data with the current background setting (fixed color or an image).
  874. * When a document with such an image contains a background image, XmHTML needs
  875. * to redo this alpha processing whenever the document layout is changed: the
  876. * exact result of this merger depends on the position of the image. This can
  877. * be a rather slow process (alpha channels require floating point ops), and
  878. * by at least storing the current background info we can achieve some
  879. * performance increase. 
  880. *****/
  881. typedef struct _AlphaChannelInfo{
  882.     int fb_maxsample;            /* frame buffer maximum sample value */
  883.     int background[3];            /* solid background color: R, G, B */
  884.     int ncolors;                /* size of background image colormap */
  885.     TColor *bg_cmap;            /* background image colormap */
  886. }AlphaChannelInfo, *AlphaPtr;
  887.  
  888. /*****
  889. * XmHTMLPart definition 
  890. *****/
  891. typedef struct _XmHTMLPart {
  892.     /* Original document Resources */
  893.     String                value;        /* raw HTML text, copied to the parser */
  894.     String                source;        /* copy used by XmHTML */
  895.     String                mime_type;    /* mime type of this text/image (?) */
  896.     Byte                mime_id;    /* internal mime id */
  897.  
  898.     /* Anchor resources */
  899.     TCursor                anchor_cursor;
  900.     Boolean                anchor_display_cursor;
  901.     Boolean                anchor_buttons;
  902.  
  903.     /* anchor colors */
  904.     Pixel                anchor_fg;
  905.     Pixel                anchor_visited_fg;
  906.     Pixel                anchor_target_fg;
  907.     Pixel                anchor_activated_fg;
  908.     Pixel                anchor_activated_bg;
  909.     Boolean                highlight_on_enter;        /* anchor highlighting */
  910.  
  911.     /* anchor underlining styles */
  912.     Byte                anchor_underline_type;
  913.     Byte                anchor_visited_underline_type;
  914.     Byte                anchor_target_underline_type;
  915.  
  916.     /* internal underlining styles, translated from above */
  917.     Byte                anchor_line;
  918.     Byte                anchor_target_line;
  919.     Byte                anchor_visited_line;
  920.  
  921.     Position            anchor_position_x;    /* for server-side imagemaps */
  922.     Position            anchor_position_y;    /* for server-side imagemaps */
  923.     XmHTMLObjectTable    *armed_anchor;        /* current anchor */
  924.     XmHTMLAnchor        *anchor_current_cursor_element;
  925.     XmHTMLAnchorProc        anchor_visited_proc;
  926.     
  927.     /* background image/color and text color resources */
  928.     Boolean                body_colors_enabled;
  929.     Boolean                body_images_enabled;
  930.     Boolean                allow_color_switching;
  931.     Boolean                allow_form_coloring;    /* body colors on HTML forms */
  932.     Boolean                freeze_animations;
  933.     Pixel                body_bg;        /* current background color */
  934.     Pixel                body_fg;        /* current foreground color */
  935.     String                body_image_url;    /* background image location */
  936.     String                def_body_image_url;    /* default bg image location */
  937.     XmHTMLImage         *body_image;    /* background image data */
  938.     TGC                    bg_gc;            /* background render gc */
  939.  
  940.     /* Font resources */
  941.     String                charset;
  942.     String                font_family;
  943.     String                font_family_fixed;
  944.     String                font_sizes;
  945.     String                font_sizes_fixed;
  946.     XmHTMLfont            *default_font;
  947.     Byte                string_direction;
  948.     Byte                alignment;
  949.     Alignment            default_halign;
  950.     Boolean                allow_font_switching;
  951.  
  952.     /* Image resources */
  953.     Boolean                images_enabled;    /* True -> show images */
  954.     int                    max_image_colors; /* 0 -> as much as possible */
  955.     float                screen_gamma;    /* gamma correction for this display */
  956.     XmImageProc            image_proc;        /* external image loader */
  957.     XmImageGifProc        gif_proc;        /* external gif decoder */
  958.     String                zCmd;            /* uncompress command for LZWStream */
  959.     XmHTMLImage            *images;        /* list of images in current doc */
  960.     Boolean                delayed_creation;    /* delayed image creation */
  961.     XCC                    xcc;            /* a lot of visual info */
  962.  
  963.     Byte                map_to_palette;    /* if and how to map to palette */
  964.     String                palette;        /* palette to use */
  965.  
  966.     /* Imagemap resources */
  967.     XmHTMLImageMap        *image_maps;    /* array of client-side imagemaps */
  968.     Pixel                imagemap_fg;    /* bounding box color */
  969.     Boolean                imagemap_draw;    /* draw imagemap bounding boxes */
  970.  
  971.     /* Frame resources */
  972.     Boolean                is_frame;        /* true when this is a frame */
  973.     FrameScrolling        scroll_type;    /* frame scrolling */
  974.     int                    frame_border;    /* add a border to the frames? */
  975.     int                    nframes;        /* no of frames managed */
  976.     XmHTMLFrameWidget    **frames;        /* list of frame childs */
  977.  
  978.     /* Document resources */
  979.     Boolean                strict_checking;
  980.     Boolean                enable_outlining;
  981.     Byte                bad_html_warnings;
  982.     XtPointer            client_data;    /* client_data for functional res. */
  983.  
  984.     /* Private Resources */
  985.     Dimension            margin_width;    /* document margins */
  986.     Dimension            margin_height;
  987.     TWidget                work_area;        /* render area */
  988.     Dimension            work_width;        /* render area dimensions */
  989.     Dimension            work_height;
  990.  
  991.     Boolean                resize_height;    /* True -> autosize vertically */
  992.     Boolean                resize_width;    /* True -> autosize horizontally */
  993.  
  994.     /* Progressive Loader Context buffer and interval */
  995.     PLCPtr                plc_buffer;        /* PLC ringbuffer */
  996.     int                    num_plcs;        /* no of PLC's in ringbuffer */
  997.     int                    plc_def_delay;    /* default PLC timeout delay */
  998.     int                    plc_delay;        /* PLC timeout delay */
  999.     int                    plc_min_delay;    /* PLC minimum timeout delay */
  1000.     int                    plc_max_delay;    /* PLC maximum timeout delay */
  1001.     TIntervalId        plc_proc_id;    /* timer id for main plc cycler */
  1002.     XmHTMLGetDataProc    get_data;        /* PLC data request function */
  1003.     XmHTMLEndDataProc    end_data;        /* PLC end signal function */
  1004.     Boolean                plc_suspended;    /* Global PLC suspension flag */
  1005.     TGC                    plc_gc;            /* gc used by all plc's */
  1006.  
  1007.     /* perform final dithering pass/use image colors */
  1008.     Byte                perfect_colors;
  1009.  
  1010.     /* Internal stuff for alpha channelled PNG images */
  1011.     AlphaPtr            alpha_buffer;
  1012.     Byte                rgb_conv_mode;    /* 24 to 8bit conversion method */
  1013.     Byte                alpha_processing;    /* do alpha channel stuff? */
  1014.  
  1015.     /* 
  1016.     * Fallback colors, required for proper color resetting between documents
  1017.     * with and without a <body> color spec.
  1018.     */
  1019.     Pixel                anchor_fg_save;
  1020.     Pixel                anchor_visited_fg_save;
  1021.     Pixel                anchor_target_fg_save;
  1022.     Pixel                anchor_activated_fg_save;
  1023.     Pixel                anchor_activated_bg_save;
  1024.     Pixel                body_bg_save;
  1025.     Pixel                body_fg_save;
  1026.  
  1027.     /* Scrollbar resources */
  1028.     TWidget                hsb;            /* vertical scrollbar TWidget id */
  1029.     TWidget                vsb;            /* horizontal scrollbar TWidget id */
  1030.     Byte                sb_policy;        /* scrollbar display policy */
  1031.     Byte                sb_placement;    /* scrollbar placement policy */
  1032.     int                    scroll_x;        /* current horizontal position */
  1033.     int                    scroll_y;        /* current vertical position */
  1034.     Boolean                needs_hsb;        /* True -> hsb required */
  1035.     Boolean                needs_vsb;        /* True -> vsb required */
  1036.  
  1037.     /* Callback resources */
  1038.     TCallbackList        activate_callback;
  1039.     TCallbackList        arm_callback;
  1040.     TCallbackList        anchor_track_callback;
  1041.     TCallbackList        frame_callback;
  1042.     TCallbackList        form_callback;
  1043.     TCallbackList        input_callback;
  1044.     TCallbackList        link_callback;
  1045.     TCallbackList        motion_track_callback;
  1046.     TCallbackList        imagemap_callback;
  1047.     TCallbackList        document_callback;
  1048.     TCallbackList        focus_callback;
  1049.     TCallbackList        losing_focus_callback;
  1050.     TCallbackList        event_callback;
  1051.     Boolean                need_tracking;        /* serve mouse/focus tracking? */
  1052.  
  1053.      XmHTMLEventProc        event_proc;    /* HTML4.0 script processing proc */
  1054.      HTEvent                *events;        /* HTML4.0 event data    */
  1055.      int                    nevents;        /* no of events watched    */
  1056.  
  1057.     /* Formatted document resources */
  1058.     int                    formatted_width;    /* total width of document */
  1059.     int                    formatted_height;    /* total height of document */
  1060.     int                    num_anchors;        /* total no of anchors in doc */
  1061.     int                    num_named_anchors;    /* total no of named anchors */
  1062.     int                    anchor_words;    /* total no of anchor words */
  1063.     XmHTMLWord            *anchors;        /* for quick anchor lookup */
  1064.     XmHTMLObject        *elements;        /* unfiltered parser output */
  1065.     XmHTMLObjectTable    *named_anchors; /* for quick named anchor lookup */
  1066.     XmHTMLAnchor        *anchor_data;    /* parsed anchor data */
  1067.     XmHTMLObjectTable    *formatted;        /* display object data */
  1068.     XmHTMLObjectTable    *paint_start;    /* first paint command */
  1069.     XmHTMLObjectTable    *paint_end;        /* last paint command */
  1070.     int                    paint_x;        /* horizontal paint start x-pos */
  1071.     int                    paint_y;        /* vertical paint start y-pos */
  1072.     int                    paint_width;    /* horizontal paint end x-pos */
  1073.     int                    paint_height;    /* vertical paint end y-pos */
  1074.     Cardinal            top_line;        /* current topline */
  1075.     Cardinal            nlines;            /* no of lines in document */
  1076.  
  1077.     /* Table resources */
  1078.     XmHTMLTable            *tables;        /* list of all tables */
  1079.  
  1080.     /* Anchor activation resources */
  1081.     int                    press_x;        /* ptr coordinates */
  1082.     int                    press_y;
  1083.     Time                pressed_time;    /* time of anchor activation */
  1084.     Time                selected_time;    /* unused for now */
  1085.     XmHTMLAnchor        *selected;        /* selected anchor */
  1086.     XmHTMLObjectTable    *current_anchor;/* selected object */
  1087.  
  1088.     /* Text selection resources */
  1089.     XmHTMLObjectTable    *selection;        /* reserved for future use */
  1090.     int                    select_start;    /* reserved for future use */
  1091.     int                    select_end;        /* reserved for future use */
  1092.  
  1093.     /* HTML Form resources */
  1094.     XmHTMLFormData        *form_data;        /* all forms in the current document */
  1095.  
  1096.     /* Misc. resources */
  1097.     int                    repeat_delay;    /* keyboard and scrollbar delay */
  1098.     TGC                    gc;                /* main rendering gc */
  1099.     Boolean                in_layout;        /* layout blocking flag.
  1100.                                          * Also used as SetValues blocking
  1101.                                          * flag by the parser.
  1102.                                          */
  1103.     int                    visibility;        /* visibility state of work_area */
  1104.  
  1105.     Boolean                debug_disable_warnings;    /* warning msg blocking flag */
  1106.     Boolean                debug_full_output;    /* allow output from FullDebug */
  1107.     Boolean                debug_save_clipmasks; /* save clipmasks as bitmaps */
  1108.     Boolean                debug_no_loopcount;    /* ignore loop_count in anims */
  1109.     String                debug_prefix;        /* debug file prefix */
  1110.     String                debug_levels;        /* debug levels to enable */
  1111.  
  1112.     unsigned char pad[64];                /* reserved for future use */
  1113.  
  1114. }XmHTMLPart;
  1115.  
  1116. #ifdef WITH_MOTIF
  1117. typedef struct _XmHTMLRec
  1118. {
  1119.     CorePart        core;
  1120.     CompositePart    composite;
  1121.     ConstraintPart    constraint;
  1122.     XmManagerPart    manager;
  1123.     XmHTMLPart        html;
  1124. } XmHTMLRec;
  1125.  
  1126. /* Define subclassing level index to be used with ResolvePartOffset */
  1127. #define XmHTMLIndex        (XmManagerIndex+1)
  1128.  
  1129. externalref XmHTMLClassRec xmHTMLClassRec;
  1130. #endif
  1131.  
  1132. /*****
  1133. * Pull in internal function proto's when building the library.
  1134. *****/
  1135. #ifdef _LIBRARY
  1136. #include "XmHTMLI.h"
  1137. #endif
  1138.  
  1139. #ifndef WITH_MOTIF
  1140. #    include "gtk-xmhtml-p.h"
  1141. #endif
  1142.  
  1143. /* Don't add anything after this endif! */
  1144. #endif /* _XmHTMLP_h_ */
  1145.